<?php
/**
 * Copyright (c) 2014 zhenrongbao.com, Inc. All Rights Reserved
 * @author: jiangshuguang
 * @Date  : 14-11-7
 * @Time  : 下午3:48
 * @brief : 
 */


function  smarty_modifier_st_substr($str,$n=4) {
    $str.=$str."";
    if(strlen($str)>$n){
        return substr($str,0,$n).'*';
    }else{
        return $str;
    }
}
